package cn.bdqn.t354.config;

import cn.bdqn.t354.web.filter.AuthorizationFtiler;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {

    //@Bean
    public FilterRegistrationBean filterRegistrationBean(){
        FilterRegistrationBean fb=new FilterRegistrationBean();
        fb.setFilter(new AuthorizationFtiler());
        fb.setName("AuthorizationFtiler");
        fb.addUrlPatterns("/main");
        fb.setOrder(1);

        return fb;
    }
}
